#ifndef MESHPOINT_H
#define MESHPOINT_H

#include "Point3D.h"
#include "Vector3D.h"
#include <math.h>
namespace geom
{
    /** Class that handles data and operations related to points in a mesh */
    class MeshPoint
    {
        public:
			/** Point coordinates */
			Point3D p;	
			/** Normal vector at this point */
			Vector3D n;	
			/** Ambient occlusion factor. 0 means it is not occluded at all, 1 means it's fully occluded */
			float AOFactor; 

			/** Constructor 
			  @param point Point coordinates
			  @param normal Normal direction at this point 
			  @param ao Ambient occlusion factor at this point */
            MeshPoint(Point3D point, Vector3D normal, float ao):p(point), n(normal),AOFactor(ao){}
			/** Constructor */
            MeshPoint(Point3D point) : p(point), n(0,0,0), AOFactor(0.5){}
			/** Constructor */
			MeshPoint() : p(0,0,0), n(0,0,0), AOFactor(0.5){}
    };

	/** Checks if 2 points have the same position, normal and AO factor. Note: Position  and normal check depends on Point3D and Vector3D operator== tolerance*/
	bool operator==(const MeshPoint& m1, const MeshPoint&m2);
}


#endif
